<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  

  
  <title>【其他】1、Mac部署LskyPro搭建本地图床 | 亦人亦码</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="在平时开发、学习的时候经常用typora做笔记并且截图，一般是typora默认把把图片和笔记放在一起（这种方式个人觉得图片放的比较分散，很乱），">
<meta property="og:type" content="article">
<meta property="og:title" content="【其他】1、Mac部署LskyPro搭建本地图床">
<meta property="og:url" content="https://xlh_blog.gitee.io/2023/04/10/%E3%80%90%E5%85%B6%E4%BB%96%E3%80%911%E3%80%81Mac%E9%83%A8%E7%BD%B2LskyPro%E6%90%AD%E5%BB%BA%E6%9C%AC%E5%9C%B0%E5%9B%BE%E5%BA%8A/index.html">
<meta property="og:site_name" content="亦人亦码">
<meta property="og:description" content="在平时开发、学习的时候经常用typora做笔记并且截图，一般是typora默认把把图片和笔记放在一起（这种方式个人觉得图片放的比较分散，很乱），">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://xlh_blog.gitee.io/2023/04/10/%E3%80%90%E5%85%B6%E4%BB%96%E3%80%911%E3%80%81Mac%E9%83%A8%E7%BD%B2LskyPro%E6%90%AD%E5%BB%BA%E6%9C%AC%E5%9C%B0%E5%9B%BE%E5%BA%8A/image-20220622111523800.png">
<meta property="og:image" content="https://xlh_blog.gitee.io/2023/04/10/%E3%80%90%E5%85%B6%E4%BB%96%E3%80%911%E3%80%81Mac%E9%83%A8%E7%BD%B2LskyPro%E6%90%AD%E5%BB%BA%E6%9C%AC%E5%9C%B0%E5%9B%BE%E5%BA%8A/image-20220622111545818.png">
<meta property="og:image" content="https://xlh_blog.gitee.io/2023/04/10/%E3%80%90%E5%85%B6%E4%BB%96%E3%80%911%E3%80%81Mac%E9%83%A8%E7%BD%B2LskyPro%E6%90%AD%E5%BB%BA%E6%9C%AC%E5%9C%B0%E5%9B%BE%E5%BA%8A/image-20220622111933146.png">
<meta property="og:image" content="https://xlh_blog.gitee.io/2023/04/10/%E3%80%90%E5%85%B6%E4%BB%96%E3%80%911%E3%80%81Mac%E9%83%A8%E7%BD%B2LskyPro%E6%90%AD%E5%BB%BA%E6%9C%AC%E5%9C%B0%E5%9B%BE%E5%BA%8A/image-20220622112031778.png">
<meta property="og:image" content="https://xlh_blog.gitee.io/2023/04/10/%E3%80%90%E5%85%B6%E4%BB%96%E3%80%911%E3%80%81Mac%E9%83%A8%E7%BD%B2LskyPro%E6%90%AD%E5%BB%BA%E6%9C%AC%E5%9C%B0%E5%9B%BE%E5%BA%8A/image-20220622112237513.png">
<meta property="og:image" content="https://xlh_blog.gitee.io/2023/04/10/%E3%80%90%E5%85%B6%E4%BB%96%E3%80%911%E3%80%81Mac%E9%83%A8%E7%BD%B2LskyPro%E6%90%AD%E5%BB%BA%E6%9C%AC%E5%9C%B0%E5%9B%BE%E5%BA%8A/image-20220622112321914.png">
<meta property="og:image" content="https://xlh_blog.gitee.io/2023/04/10/%E3%80%90%E5%85%B6%E4%BB%96%E3%80%911%E3%80%81Mac%E9%83%A8%E7%BD%B2LskyPro%E6%90%AD%E5%BB%BA%E6%9C%AC%E5%9C%B0%E5%9B%BE%E5%BA%8A/image-20220622112343286.png">
<meta property="article:published_time" content="2023-04-10T07:16:00.000Z">
<meta property="article:modified_time" content="2023-04-10T07:21:24.178Z">
<meta property="article:author" content="Mr.xi">
<meta property="article:tag" content="Java, PHP,Linux,博客">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://xlh_blog.gitee.io/2023/04/10/%E3%80%90%E5%85%B6%E4%BB%96%E3%80%911%E3%80%81Mac%E9%83%A8%E7%BD%B2LskyPro%E6%90%AD%E5%BB%BA%E6%9C%AC%E5%9C%B0%E5%9B%BE%E5%BA%8A/image-20220622111523800.png">
  
    <link rel="alternate" href="/atom.xml" title="亦人亦码" type="application/atom+xml">
  
  
    <link rel="icon" href="/image/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  
<link rel="stylesheet" href="/css/style.css">


<meta name="generator" content="Hexo 5.4.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">亦人亦码</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
          <a class="main-nav-link" href="/about">About</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="搜索"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="https://xlh_blog.gitee.io"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-【其他】1、Mac部署LskyPro搭建本地图床" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2023/04/10/%E3%80%90%E5%85%B6%E4%BB%96%E3%80%911%E3%80%81Mac%E9%83%A8%E7%BD%B2LskyPro%E6%90%AD%E5%BB%BA%E6%9C%AC%E5%9C%B0%E5%9B%BE%E5%BA%8A/" class="article-date">
  <time datetime="2023-04-10T07:16:00.000Z" itemprop="datePublished">2023-04-10</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/%E5%85%B6%E4%BB%96/">其他</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      【其他】1、Mac部署LskyPro搭建本地图床
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>在平时开发、学习的时候经常用typora做笔记并且截图，一般是typora默认把把图片和笔记放在一起（这种方式个人觉得图片放的比较分散，很乱），<span id="more"></span>然后插入，最后上传到gitee仓库上，随着图片的增多，仓库的容量在不断的增加，就想着引入图床，一开始是使用gitee作为图床，但是自从gitee将仓库私有之后使用gitee作为图床的方案就不行了，但是也可以申请域名使用七牛云，但是因为我只在自己本地电脑上查看笔记，所以也就不用七牛云了，然后在网上查到一个图床项目：Lsky-Pro，这个项目是基于PHP开发的开源项目【巧了，我之前就是做PHP开发，本机一直保存着PHP开发环境】</p>
<h1 id="1、环境准备"><a href="#1、环境准备" class="headerlink" title="1、环境准备"></a>1、环境准备</h1><p>本地系统：Mac</p>
<p>运行环境：PHP7.2.3+MySQL5.7</p>
<p>图床：Lsky-Pro v1.6.4【目前Lksy已经开发到了v2版本，但是需要php8+mysql8，不想对本地PHP升级，索性就用v1版本】</p>
<p>项目官网：<a target="_blank" rel="noopener" href="https://www.lsky.pro/">https://www.lsky.pro</a></p>
<p>版本仓库： <a target="_blank" rel="noopener" href="https://github.com/lsky-org/lsky-pro/releases">https://github.com/lsky-org/lsky-pro/releases</a> </p>
<p>图床客户端：uPic</p>
<p>markDown编辑器：typora</p>
<h1 id="2、安装"><a href="#2、安装" class="headerlink" title="2、安装"></a>2、安装</h1><p>1、首先指定项目运行环境，这个根据个人电脑环境规划自行决定</p>
<p>2、下载仓库代码，到目录，如下：</p>
<img src="/2023/04/10/%E3%80%90%E5%85%B6%E4%BB%96%E3%80%911%E3%80%81Mac%E9%83%A8%E7%BD%B2LskyPro%E6%90%AD%E5%BB%BA%E6%9C%AC%E5%9C%B0%E5%9B%BE%E5%BA%8A/image-20220622111523800.png" class="">

<img src="/2023/04/10/%E3%80%90%E5%85%B6%E4%BB%96%E3%80%911%E3%80%81Mac%E9%83%A8%E7%BD%B2LskyPro%E6%90%AD%E5%BB%BA%E6%9C%AC%E5%9C%B0%E5%9B%BE%E5%BA%8A/image-20220622111545818.png" class="">

<p>3、配置nginx</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br></pre></td><td class="code"><pre><span class="line">server &#123;</span><br><span class="line">    listen       8891; # 端口</span><br><span class="line">    server_name  localhost;</span><br><span class="line"></span><br><span class="line">    root /Users/Documents/lsky-pro/public; # 项目public地址</span><br><span class="line">    index  index.php index.html index.htm;</span><br><span class="line"></span><br><span class="line">    location / &#123;</span><br><span class="line">        if (!-e $request_filename) &#123;</span><br><span class="line">            rewrite ^(.*)$ /index.php?s=$1 last; break;</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">    location ~ .*\.(php|php5)?$</span><br><span class="line">    &#123;</span><br><span class="line">        #fastcgi_pass  unix:/tmp/php-cgi.sock;</span><br><span class="line">        fastcgi_pass  127.0.0.1:9009;</span><br><span class="line">        fastcgi_index index.php;</span><br><span class="line">        include fastcgi.conf;</span><br><span class="line">    &#125;</span><br><span class="line">    #对图片进行缓存</span><br><span class="line">    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$</span><br><span class="line">    &#123;</span><br><span class="line">        expires 30d;</span><br><span class="line">    &#125;</span><br><span class="line">    #对js和css进行缓存</span><br><span class="line">    location ~ .*\.(js|css)?$</span><br><span class="line">    &#123;</span><br><span class="line">        expires 1h;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<p>然后设置nginx上传文件大小的限制</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">client_max_body_size 200m;</span><br></pre></td></tr></table></figure>

<p>4、重启nginx</p>
<p>5、访问项目：localhost:8891</p>
<p>6、第一次进入需要进行初始化校验和设置，主要校验php版本以及扩展是否缺失，然后填写mysql地址，账号</p>
<p>7、最后进入项目如下：</p>
<img src="/2023/04/10/%E3%80%90%E5%85%B6%E4%BB%96%E3%80%911%E3%80%81Mac%E9%83%A8%E7%BD%B2LskyPro%E6%90%AD%E5%BB%BA%E6%9C%AC%E5%9C%B0%E5%9B%BE%E5%BA%8A/image-20220622111933146.png" class="">

<p>8、进行一下简单配置，比如设置容量</p>
<img src="/2023/04/10/%E3%80%90%E5%85%B6%E4%BB%96%E3%80%911%E3%80%81Mac%E9%83%A8%E7%BD%B2LskyPro%E6%90%AD%E5%BB%BA%E6%9C%AC%E5%9C%B0%E5%9B%BE%E5%BA%8A/image-20220622112031778.png" class="">

<p>9、配置uPic，如下图所示：因为是本地搭建， 所以这里选择“匿名”</p>
<img src="/2023/04/10/%E3%80%90%E5%85%B6%E4%BB%96%E3%80%911%E3%80%81Mac%E9%83%A8%E7%BD%B2LskyPro%E6%90%AD%E5%BB%BA%E6%9C%AC%E5%9C%B0%E5%9B%BE%E5%BA%8A/image-20220622112237513.png" class="">

<p>10、整合typora</p>
<img src="/2023/04/10/%E3%80%90%E5%85%B6%E4%BB%96%E3%80%911%E3%80%81Mac%E9%83%A8%E7%BD%B2LskyPro%E6%90%AD%E5%BB%BA%E6%9C%AC%E5%9C%B0%E5%9B%BE%E5%BA%8A/image-20220622112321914.png" class="">

<img src="/2023/04/10/%E3%80%90%E5%85%B6%E4%BB%96%E3%80%911%E3%80%81Mac%E9%83%A8%E7%BD%B2LskyPro%E6%90%AD%E5%BB%BA%E6%9C%AC%E5%9C%B0%E5%9B%BE%E5%BA%8A/image-20220622112343286.png" class="">

<p>至此就完成了本地图床搭建</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="https://xlh_blog.gitee.io/2023/04/10/%E3%80%90%E5%85%B6%E4%BB%96%E3%80%911%E3%80%81Mac%E9%83%A8%E7%BD%B2LskyPro%E6%90%AD%E5%BB%BA%E6%9C%AC%E5%9C%B0%E5%9B%BE%E5%BA%8A/" data-id="clt2kwbil000is3370ttg6md9" class="article-share-link">Share</a>
      
      
    </footer>
  </div>
  
    
<nav id="article-nav">
  
  
    <a href="/2023/04/06/%E3%80%90%E8%BF%90%E7%BB%B4%E3%80%917%E3%80%81%E8%A7%A3%E5%86%B3virtualBox%E5%AF%BC%E5%85%A5voa%E6%96%87%E4%BB%B6%E5%90%8E%E6%97%A0%E6%B3%95%E4%B8%8A%E7%BD%91%E9%97%AE%E9%A2%98/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">【运维】7、解决virtualBox导入voa文件后无法上网问题</div>
    </a>
  
</nav>

  
</article>




</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">分类</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/Activiti7/">Activiti7</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/Git/">Git</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E5%85%B6%E4%BB%96/">其他</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E5%90%8E%E7%AB%AF/">后端</a></li><li class="category-list-item"><a class="category-list-link" href="/categories/%E8%BF%90%E7%BB%B4/">运维</a></li></ul>
    </div>
  </div>


  
    

  
    
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">归档</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2023/04/">四月 2023</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">最新文章</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2023/04/10/%E3%80%90%E5%85%B6%E4%BB%96%E3%80%911%E3%80%81Mac%E9%83%A8%E7%BD%B2LskyPro%E6%90%AD%E5%BB%BA%E6%9C%AC%E5%9C%B0%E5%9B%BE%E5%BA%8A/">【其他】1、Mac部署LskyPro搭建本地图床</a>
          </li>
        
          <li>
            <a href="/2023/04/06/%E3%80%90%E8%BF%90%E7%BB%B4%E3%80%917%E3%80%81%E8%A7%A3%E5%86%B3virtualBox%E5%AF%BC%E5%85%A5voa%E6%96%87%E4%BB%B6%E5%90%8E%E6%97%A0%E6%B3%95%E4%B8%8A%E7%BD%91%E9%97%AE%E9%A2%98/">【运维】7、解决virtualBox导入voa文件后无法上网问题</a>
          </li>
        
          <li>
            <a href="/2023/04/06/%E3%80%90%E8%BF%90%E7%BB%B4%E3%80%916%E3%80%81Docker%E8%BF%90%E8%A1%8CSpringCloud%E5%BE%AE%E6%9C%8D%E5%8A%A1%E5%B9%B6%E9%80%9A%E8%BF%87IP%E8%BF%9B%E8%A1%8C%E6%9C%8D%E5%8A%A1%E6%B3%A8%E5%86%8C/">【运维】5、Docker运行SpringCloud微服务并通过IP进行服务注册</a>
          </li>
        
          <li>
            <a href="/2023/04/06/%E3%80%90%E8%BF%90%E7%BB%B4%E3%80%915%E3%80%81win10%E9%80%9A%E8%BF%87vagrant-virtulbox%E6%90%AD%E5%BB%BAcentos7%E8%99%9A%E6%8B%9F%E6%9C%BA%E7%8E%AF%E5%A2%83%E6%97%B6%E6%8A%A5%E9%94%99/">【运维】5、win10通过vagrant+virtulbox搭建centos7虚拟机环境时报错</a>
          </li>
        
          <li>
            <a href="/2023/04/06/%E3%80%90%E5%90%8E%E7%AB%AF%E3%80%91SpringBoot%E6%95%B4%E5%90%88MQTT%EF%BC%88EMQX%EF%BC%89/">【后端】SpringBoot整合MQTT（EMQX）</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2024 Mr.xi<br>
        <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
        <span id="busuanzi_container_site_pv">
          本文总阅读量<span id="busuanzi_value_page_pv"></span>次
        </span><a href="https://beian.miit.gov.cn/" target="_blank">京ICP备18049089号-2</a>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>


</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
    <a href="/about" class="mobile-nav-link">About</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css">

  
<script src="/fancybox/jquery.fancybox.pack.js"></script>




<script src="/js/script.js"></script>





<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?803c71743b7cfc4dac421ac4fc646963";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>



  </div>
</body>
</html>